﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index1.aspx.cs" Inherits="AnyOffice.general.work_plan.manage.index1" %>

<%@ Register TagPrefix="Webdiver" Namespace="Webdiver" Assembly="AspnetPager" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>项目进度</title>
		
		<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
		<meta content="C#" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
		<script type="text/javascript" language="JavaScript">                             
 function open_workplan(plan_id)
{
// URL="../read_workplan.aspx?plan_id="+plan_id;
// myleft=(screen.availWidth-600)/2;
// window.open(URL,"read_notify","height=450,width=600,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top=150,left="+myleft+",resizable=yes");

 var mwidth = "600";
 var mheight = "450";
 var loc_x = parseInt((window.screen.width - mwidth) / 2);
 var loc_y = parseInt((window.screen.height - mwidth) / 2);

 var _oParameter = new Object();
 _oParameter.dialogTitle = "项目进度";
 _oParameter.openFile = "../read_workplan.aspx?plan_id=" + plan_id + "&num=" + Math.random();

 window.showModalDialog('shDialog.htm', _oParameter, 'dialogHeight:' + mheight + 'px;dialogWidth:' + mwidth + 'px;dialogLeft:' + loc_x + ';dialogTop:' + loc_y + ';help:no;status:no;scroll:yes;titlebar:no;toolbar:no');
  


}

 function delete_workplan(plan_id,page)
{
    msg = '确认要删除该项目么？';
	if(window.confirm(msg))
	{
		URL="delete.aspx?plan_id="+plan_id+"&page="+page;
		window.location=URL;
	}
}                                                          
		</script>
	</HEAD>
	<body class="bodycolor" style="padding-top:0;" topMargin="5">
		<form id="Form1" method="post" runat="server">
        <div class="main_div">
			<table class="small" cellSpacing="0" cellPadding="3" width="100%" border="0">
				<tr>
					<td class="tab_ti"  width="40%">
							管理项目
					</td>
					<td vAlign="bottom"  width="20%"><asp:literal id="litNavCount" runat="server"></asp:literal></td>
					<td vAlign="bottom" width="40%"><asp:literal id="litNavPager" runat="server"></asp:literal></td>
				</tr>
			</table>
			<br>
			<asp:panel id="pnlMain" runat="server">				
					<asp:Repeater id="rptWorkPlan" runat="server" EnableViewState="False">
					<HeaderTemplate>
						<TABLE class="tab_pub" cellSpacing="0" cellPadding="0" width="100%" border="0">
						<TR>
							<TD noWrap class="TableHeader" align="center">项目名称</TD>
							<TD noWrap class="TableHeader" align="center">开始日期</TD>
							<TD noWrap class="TableHeader" align="center">预计完成日期</TD>
							<TD noWrap class="TableHeader" align="center">项目类别</TD>
							<TD noWrap class="TableHeader" align="center">发布范围</TD>
							<TD noWrap class="TableHeader" align="center">负责人</TD>
							<TD noWrap class="TableHeader" align="center">进度</TD>
							<TD noWrap class="TableHeader" align="center">状态</TD>
							<TD noWrap class="TableHeader" align="center">操作</TD>
						</TR>
					</HeaderTemplate>
					<ItemTemplate>
						<tr class="TableLine1">
						<td><a href="javascript:open_workplan('<%#Eval("PlanId")%>');"><%#Eval("Name")%></a></td>
						<td nowrap align="center"><%# Eval("BeginDate") != DBNull.Value ? Convert.ToDateTime(Eval("BeginDate")).ToString("yyyy-MM-dd"):""%></td>
						<td nowrap align="center"><%# Eval("EndDate") != DBNull.Value ? Convert.ToDateTime(Eval("EndDate")).ToString("yyyy-MM-dd"):""%></td>
						<td nowrap align="center"><%#Eval("TypeName")%></td>
						<td><%#Eval("ToName")%></td>
						<td nowrap align="center"><%#Eval("UserName")%></td>
						<td nowrap align="center" width="80">
							<table width="70px" border="0" cellspacing="0" cellpadding="0" style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid; HEIGHT: 8px" title='<%#Convert.ToInt32(Eval("CompletedPercent"))*10%>%'>
								<tr>
									<td bgcolor='green' width='<%#Convert.ToInt32(Eval("CompletedPercent"))*10%>%'></td>
									<td bgcolor="#ffffff" width='<%#100-Convert.ToInt32(Eval("CompletedPercent"))*10%>%'></td>
								</tr>
							</table>
						</td>						
						<td nowrap align="center"><%#GetStatusDesc(Convert.ToInt32(Eval("Status")))%></td>
						<td nowrap align="center">
						&nbsp;
                        <a href="Report_List.aspx?plan_id=<%#Eval("PlanId")%>&page=<%=ViewState["CurrentPage"]%>">查看汇报</a>
						<a href="edit.aspx?plan_id=<%#Eval("PlanId")%>&page=<%=ViewState["CurrentPage"]%>">修改</a>
						<a href="javascript:delete_workplan('<%#Eval("PlanId")%>','<%=ViewState["CurrentPage"]%>');">删除</a>
						&nbsp;										
						</tr>
						</ItemTemplate>
						<AlternatingItemTemplate>
						<tr class="TableLine2">
						<td><a href="javascript:open_workplan('<%#Eval("PlanId")%>');"><%#Eval("Name")%></a></td>
						<td nowrap align="center"><%# Eval("BeginDate") != DBNull.Value ? Convert.ToDateTime(Eval("BeginDate")).ToString("yyyy-MM-dd"):""%></td>
						<td nowrap align="center"><%# Eval("EndDate") != DBNull.Value ? Convert.ToDateTime(Eval("EndDate")).ToString("yyyy-MM-dd"):""%></td>
						<td nowrap align="center"><%#Eval("TypeName")%></td>
						<td><%#Eval("ToName")%></td>
						<td nowrap align="center"><%#Eval("UserName")%></td>
						<td nowrap align="center" width="80">
							<table width="70px" border="0" cellspacing="0" cellpadding="0" style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid; HEIGHT: 8px" title='<%#Convert.ToInt32(Eval("CompletedPercent"))*10%>%'>
								<tr>
									<td bgcolor='green' width='<%#Convert.ToInt32(Eval("CompletedPercent"))*10%>%'></td>
									<td bgcolor="#ffffff" width='<%#100-Convert.ToInt32(Eval("CompletedPercent"))*10%>%'></td>
								</tr>
							</table>
						</td>
						<td nowrap align="center"><%#GetStatusDesc(Convert.ToInt32(Eval("Status")))%></td>
						<td nowrap align="center">
						&nbsp;
                         <a href="Report_List.aspx?plan_id=<%#Eval("PlanId")%>&page=<%=ViewState["CurrentPage"]%>">查看汇报</a>
						<a href="edit.aspx?plan_id=<%#Eval("PlanId")%>&page=<%=ViewState["CurrentPage"]%>">修改</a>
						<a href="javascript:delete_workplan('<%#Eval("PlanId")%>','<%=ViewState["CurrentPage"]%>');">删除</a>
						&nbsp;
						</td>							
						</tr>
						</AlternatingItemTemplate>
						<FooterTemplate>
							</TABLE>
						</FooterTemplate>
						</asp:Repeater>
					<div class="div_cotr">
							<Webdiver:AspNetPager id="AspNetPager1" runat="server" AlwaysShow="True" PageSize="10" DisabledButtonImageNameExtension="g"
								CpiButtonImageNameExtension="r" ButtonImageNameExtension="n" ImagePath="../images" PagingButtonSpacing="0"
								CustomInfoSectionWidth="35%" UrlPaging="True" NumericButtonTextFormatString="[{0}]" SubmitButtonText="转 到"
								ShowInputBox="Always" ShowCustomInfoSection="left" HorizontalAlign="Right" OnPageChanged="ChangePage"
								Font-Size="10pt" SubmitButtonClass="bnt05" InputBoxClass="SmallInput" CssClass="small1"></Webdiver:AspNetPager>
					</div>				
			</asp:panel>
			<asp:literal id="litMessage" runat="server"></asp:literal>
            </div>
		</form>
	</body>
</HTML>
